package com.RunGo;

import com.Dao.PocketMoneyDao.Method;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Scanner;


public class pocketmoneyRun {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);


        while (true) {
            // 循环体中的代码会无限重复执行
            System.out.println("-------------零钱通菜单-------------");
            System.out.println("\t\t\t1.零钱通明细");
            System.out.println("\t\t\t2.收益 入账");
            System.out.println("\t\t\t3.消 费");
            System.out.println("\t\t\t4.退 出");
            System.out.println("请选择(1-4)");
            String name;
//
            int a = scanner.nextInt();
            switch (a) {

                case 1:
                    Method.selectAllbytime();
                    break;

                // 可选
                case 2:

                    Method.insertdeposit();
                    Method.selectAllbytime();
                    break;


                case 3:

                    Method.insertreducedeposit();
                    Method.selectAllbytime();


                    break;


                case 4:
                    System.out.printf("您已选择退出");
                    break;


                case 5:


                    break;


            }
            if (a == 4) {
                break;
            }

            // 注意：这里缺少任何跳出循环的条件（如break语句）
        }


    }
}

